Add test for cv synchronous-distribution delete#22006
Conversation
Reviewer's GuideAdds a high-level API test that validates synchronous distribution deletion for content views, ensuring the associated Pulp DeleteDistributions task is created and contains expected output. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
wait_for_taskssearch query is tightly coupled to the exact human-readable action description (name, org, etc.), which may change and make the test flaky; consider searching by more stable attributes (e.g., task label and resource IDs) or capturing the specific task ID from the delete operation instead. - The long inline
foreman-rake consolecommand string in the test is somewhat brittle and hard to read; extracting this into a reusable helper that takes the task ID and returns the DeleteDistributions output would improve readability and make future changes easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `wait_for_tasks` search query is tightly coupled to the exact human-readable action description (name, org, etc.), which may change and make the test flaky; consider searching by more stable attributes (e.g., task label and resource IDs) or capturing the specific task ID from the delete operation instead.
- The long inline `foreman-rake console` command string in the test is somewhat brittle and hard to read; extracting this into a reusable helper that takes the task ID and returns the DeleteDistributions output would improve readability and make future changes easier.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
using postgres psql, couldn't decode the binary output which is in Ruby Marshal format, a simpler approach using foreman-rake console gives a better output. I am taking referenec for |
vijaysawant
left a comment
There was a problem hiding this comment.
Waiting for PRT to get green.
Ack 👏
|
trigger: test-robottelo |
|
|
PRT Result |
vsedmik
left a comment
There was a problem hiding this comment.
Overall looks good to me, left a few proposals
eca70d4 to
9b1e8aa
Compare
|
|
PRT Result |
Problem Statement
In previous versions of Foreman, actions that used the pulp task DeleteDistributions weren't planned as an asynchronous pulp task, and this caused potential race conditions.
Solution
This is a difficult issue to reliably reproduce, so verifying it via checking the Dynflow console is the most reliable way to verify.
Related Issues
https://redhat.atlassian.net/browse/SAT-45529
PRT test Cases example
trigger: test-robottelo
pytest: tests/foreman/api/test_contentview.py -k 'test_positive_synchronous_distribution_delete'
Summary by Sourcery
Tests: